<?php
/**
* smarty function to get constant value which define before
* @param  name    the constant name
* @param  assign  the assign to variable name
* @return string of value or assign to value if assign param is set
*/
function smarty_function_keyword_page($params, &$smarty) 
{
    $startnum = isset($params[startnum])?$params[startnum]:-1;
    $rowcount = SessionUtil::getVar('row_count');
    $limit    = 25;//SessionUtil::getVar('limit');

    //echo "row : ".$rowcount ."= limit".$limit;

    $page_no = floor(($startnum+$limit)/$limit);

      if($startnum == -1){
        echo "";
      }else{
        echo ", หน้า".$page_no;
      }

}